 |
|
 |
Subject: Tip: Deleting devices in traveler |
 |
 |
 |
Product Area: Notes Traveler |
 |
Technical Area: Announcement |
 |
Platform: Windows |
 |
Release: 8.5.3 |
 |
Reproducible: Not applicable |
 |
 |
 |
 |
So if you maintain a traveler server it's a safe bet that you have to delete old devices, devices of users no longer here etc. I for one got tired of always having to type the command in the console just to delete a device. Today I decide to create a button in the Lotus Traveler database.
I copied the Device view, moved the date last synced column to be the first column and sorted it oldest to newest. I then created an action button with the following code.
Declare Function NSFRemoteConsole Lib "nnotes.dll" (Byval ServerName As String, Byval ConsoleCommand As String, rethBuffer As Long) As Integer
Sub Initialize
Dim api_res As Integer
Dim hBuf As Long
Dim Dev As String
Dim User As String
Dim ws As New NotesUIWorkspace
Dim uiview As NotesUIView
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Set uiview = ws.CurrentView
Set dc = uiview.Documents
Set doc = dc.GetFirstDocument
While Not (doc Is Nothing)
Dev = doc.deviceid(0)
User = doc.username(0)
'Send the console command TELL traveler delete device_id username to server traveler server
api_res = NSFRemoteConsole("your server", "TELL traveler delete " + Dev + " " + User, hBuf)
api_res = NSFRemoteConsole("your server", "TELL traveler security delete " + Dev + " " + User, hBuf)
Set doc = dc.GetNextDocument(doc)
Wend
Messagebox "Device(s) Deleted"
Call uiview.DeselectAll
End Sub
Just replace your server with your server name like mytraveler/mydomain. Leave the quotes.
So this grabs the deviceid and the username from the selected documents, yes you can select more than one at a time, and inserts those values into the send console command. So now deleting devices is as easy as selecting the ones you want to remove and clicking the button.
I hope this helps anyone else who is tired of having to type the console command in all the time. Maybe IBM should incorporate this into their design :).
 
Feedback number WEBB92GTCS created by ~Holly Nonfoogenader on 11/28/2012

Status: Open
Comments:

Tip: Deleting devices in traveler (~Holly Nonfooge... 28.Nov.12)
. . Thank you! (~Sigmund Dworel... 29.Nov.12) |
|  |
|